package com.beans;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;

/**
 * \* Created with IntelliJ IDEA.
 * \* User: Administrator
 * \* Date: 2022/7/16
 * \* Time: 22:35
 * \* To change this template use File | Settings | File Templates.
 * \* Description:
 * \
 */
@Controller
public class UserController {

    @Autowired
    @Qualifier(value = "user1")
    private User user1;


    @Autowired
    @Qualifier(value = "user2")
    private User user2;

    public void sayHi(){
        System.out.println("User: " + user1);
        System.out.println("User: " + user2);
    }
}
